#ifndef MAPOBSTRUCT_H
#define MAPOBSTRUCT_H

#include <wx/scrolwin.h>
#include <vector>
#include <boost/dynamic_bitset.hpp>
#include <wx/bitmap.h>

using namespace boost;
using namespace std;

class MapView: public wxScrolledWindow
{
public:

    MapView(wxWindow* parent,wxWindowID id=wxID_ANY,const wxPoint& pos=wxDefaultPosition,const wxSize& size=wxDefaultSize);
    virtual ~MapView();
	void SetImage(wxString &fileName);
	wxSize GetSize();
    //(*Declarations(MapView)
    //*)
	vector<dynamic_bitset<>> &GetObstruct()
	{
		return m_obstruct;
	}
	vector<dynamic_bitset<>> &GetShelter()
	{
		return m_shelter;
	}
protected:

    //(*Identifiers(MapView)
    //*)

private:
    void Draw(wxDC &dc);
    void OnPaint(wxPaintEvent& event);
    void OnLeftDown(wxMouseEvent &event);
    void OnLeftUp(wxMouseEvent &event);
    void OnActive(wxShowEvent &event);
    void OnMove(wxMouseEvent &event);
    void OnBackground(wxEraseEvent &event);
    void ChangeObstruct(wxRect &rect,bool add);
	void ChangeShelter(wxRect &rect,bool add);
    //(*Handlers(MapView)
    //*)
    DECLARE_EVENT_TABLE()
    vector<dynamic_bitset<>> m_obstruct;
	vector<dynamic_bitset<>> m_shelter;
    wxRect m_selRect;
    bool m_drawSelRect;
	wxBitmap m_bmp;
	wxImage m_obstructImg;
	wxImage m_shelterImg;
};

#endif
